畫frequency response和phase response(MATLAB))


修DSP時有學到system的frequency response,想要以matlab tool來畫增強對frequency response的感覺,以下以moving average system來當作例子:
matlab code(frequency response)如下:

omega = -2*pi:pi/400:2*pi;
H5 = ((1/5)*(1-exp(-1i*omega*5))./(1-exp(-1i*omega)));
plot(omega,abs(H5)), title('frequency response');

結果的圖如下

matlab code(phase response)如下:

omega = -2*pi:pi/400:2*pi;
H5 = ((1/5)*(1-exp(-1i*omega*5))./(1-exp(-1i*omega)));
plot(omega,angle(H5)), title('Phase plot');

結果的圖如下

#matlab







你可能感興趣的文章

Unveiling the Mystery: Understanding the Black Dot on Your Tooth

Unveiling the Mystery: Understanding the Black Dot on Your Tooth

使用 Python 進行中斷點 step by step debug 除錯

使用 Python 進行中斷點 step by step debug 除錯

[week11] - 關於資安

[week11] - 關於資安






留言討論